home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
United Public Domain Gold 4
/
United Public Domain Gold 4.iso
/
fredfish
/
ff.0065.dms
/
ff.0065.adf
/
PascalToC
/
testfile.p
< prev
Wrap
Text File
|
1987-04-04
|
555b
|
24 lines
{ sort -- external sort of text lines, from Software Tools in Pascal, pg 121 }
procedure sort;
const
MAXCHARS = 10000; { maximum # of text characters }
MAXLINES = 300; { maximum # of lines }
MERGEORDER = 5;
type
charpos = 1..MAXCHARS;
charbuf = array [1..MAXCHARS] of character;
posbuf = array [1..MAXLINES] of charpos;
pos = 0..MAXLINES;
fdbuf = array [1..MERGEORDER] of filedesc;
var
linebuf : charbuf;
linepos : posbuf;
nlines : pos;
infile: fdbuf;
outfile : filedesc;
high, low, lim: integer;
done : boolean;
name : string;
begin
end